package View;

import java.awt.*;

import javax.swing.*;
import javax.swing.SpringLayout.Constraints;
 

public class Frameset {

	private JFrame frame;
	private JLabel[] label;
	private JButton[] button;
	private GridLayout[] layout;
	private GridBagLayout gbl1,gbl2;
	private GridBagConstraints gbc1,gbc2;
	private JPanel[] jpane;
	private JTextField choosepath;
	
	public Frameset() {
		
	}
	
	protected final void initFrame(int x, int y){
		frame = new JFrame();
		frame.setSize(x,y);
		frame.setTitle("Project Converter");
	}
	
	protected final void initLabels(){
		label= new JLabel[4];
		label[0]= new JLabel();
		label[1]=new JLabel();
		label[2]=new JLabel();
		label[3]=new JLabel();
	}
	
	protected final void initButtons(){
		choosepath= new JTextField("Insert output path here");
		button= new JButton[3];
		button[0]= new JButton("Convert");
		button[0].setPreferredSize(new Dimension(50,20));
		button[1]= new JButton("Cancel");
		button[2]= new JButton("Choose File");
		button[2].setBounds(20, 20, 70, 30);
	}
	
	protected final void initLayout(){
		jpane= new JPanel[5];
		jpane[0]=new JPanel();
		jpane[1]=new JPanel();
		jpane[2]=new JPanel();
		jpane[3]=new JPanel();
		jpane[4]=new JPanel();
		layout= new GridLayout[4];
		layout[0]= new GridLayout(0,2,10,0);
		layout[1]= new GridLayout(0,2,10,0);
		layout[2]= new GridLayout(0,1);
		layout[3]= new GridLayout(0,1);
		gbl1=new GridBagLayout();
		gbl2=new GridBagLayout();
	}
	
	protected final void buildFrame(){
		frame.setLayout(layout[3]);
		jpane[0].setLayout(layout[0]);
		jpane[1].setLayout(layout[2]);
		jpane[2].setLayout(layout[1]);
		
		jpane[0].add(button[2]);
		jpane[0].add(label[0]);
		jpane[1].add(choosepath);
		jpane[2].add(button[0]);
		jpane[2].add(label[1]);
		jpane[3].add(label[2]);
		jpane[4].add(label[3]);
		
		frame.add(jpane[0]);
		frame.add(jpane[3]);
		frame.add(jpane[1]);
		frame.add(jpane[4]);
		frame.add(jpane[2]);
		
		frame.setVisible(true);
	}
	
}
